<template>
	<view class="content">
		<view class="wechatapp">
			<view class="header">
				<image class="avatar" :src="avatarUrl"></image>
			</view>
			<p class="avatar_change">昵称</p>
		</view>
		
		<u-cell-group>
			<u-cell icon="setting" title="个人设置" isLink @tap="gotopage"></u-cell>
			<u-cell icon="file-text" title="我的报名" isLink></u-cell>
		</u-cell-group>
		
		<tabbarLaw v-if="flag" :tabindex='2' :homeId="game_id"></tabbarLaw>
	</view>
</template>

<script>
	import tabbarLaw from '@/components/uni-tabbar/tabbarLaw.vue';
	export default {
		components: {
			tabbarLaw
		},
		data() {
			return {
				game_id: '',
				flag:false,//当数据获得之后再进行子组件的渲染
				avatarUrl: 'https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0',
			}
		},
		onLoad(options) {
			this.game_id = options.game_id
			this.flag = true//当数据获得的之后再进行子组件的渲染
		},
		methods: {
			gotopage() {
				uni.navigateTo({
					url: '/pages/mine/info'
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.content {
		padding: 0 2%;
	}

	.wechatapp {
		padding: 80rpx 0;
		margin-bottom: 80rpx;
		text-align: center;

		.header {
			width: 190rpx;
			height: 190rpx;
			border: 4rpx solid #fff;
			margin: 0 auto 0;
			border-radius: 50%;
			overflow: hidden;
			box-shadow: 2rpx 0 10rpx rgba(50, 50, 50, 0.3);
			
			.avatar {
				width: 190rpx;
				height: 190rpx;
				border-radius: 50%;
			}
		}
		.avatar_change{
			font-size: 12px;
			color: #999;
			margin-top: 5px;
		}
	}
</style>
